package javaWeb;

import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet(urlPatterns = "/javaWeb/TextServlet" )
public class TextServlet extends HttpServlet {
    @Override
    public void destroy() {
        System.out.println("被销毁了");
    }

    @Override
    public void init() throws ServletException {
        System.out.println("初始化成功");
    }

    @Override
    public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException {
        System.out.println("被调用了");
    }
}
